import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:hygf/bean/AddStartedApproval.dart';
import 'package:hygf/bean/CustomerList.dart';
import 'package:hygf/view/image_picker_widget.dart';

import '../../../../view/file_picker_widget.dart';

class StartApprovalState {
  bool isReadOnly = true;
  StartedApproval startedApproval = StartedApproval();
  AddStartedApproval addStartedApproval = AddStartedApproval();
  var rnRemarkController = TextEditingController();
  var contractController = ImagePickerWidgetController();
  var propertyCertificateController = ImagePickerWidgetController();
  var copyIdCardController = ImagePickerWidgetController();
  var reportController = ImagePickerWidgetController();
  var constructionController = ImagePickerWidgetController();
  var designPhotoController = ImagePickerWidgetController();
  var loadReportController = ImagePickerWidgetController();
  var otherController = ImagePickerWidgetController();
  var contractFileController = FilePickerController();
  var propertyFileController = FilePickerController();
  var copyIdFileController = FilePickerController();
  var reportFileController = FilePickerController();
  var constructionFileController = FilePickerController();
  var designPhotoFileController = FilePickerController();
  var loadReportFileController = FilePickerController();

  StartApprovalState() {
    var map = Get.arguments;
    CustomerListItem itemData = map["pageData"];
    startedApproval.customerInfoId = itemData.id;
    if (itemData.status == 11 ||
        itemData.status == 12 ||
        itemData.status == 14) {
      isReadOnly = false;
    }
    if(map["title"] != null){
      if(map["title"]  == "客户详情"){
        isReadOnly = true;
      }
    }
  }
}
